<script>
    let name = "click me"
    let t = fasle
    function demo() {
        console.log("click me");
        t = !t
    }
</script>

<button onclick={demo} class={t ? "w20 h20 bg-yellow": "w20 h20 bg-green"}>{name}</button>